﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SmoothStreaming.PerformanceTesting
{
    public class StreamIndex
    {
        public string StreamType { get; set; }
        public string Url { get; set; }

        List<SmoothStreamChunk> _childChunks = new List<SmoothStreamChunk>();
        List<int> _bitrates = new List<int>();

        public IEnumerable<SmoothStreamChunk> Chunks { get { return _childChunks; } }
        public void AddChunk(SmoothStreamChunk ssChunk) { _childChunks.Add(ssChunk); }

        public void AddChunk(double fragmentIndex, int duration, int bitrate)
        {
            SmoothStreamChunk ssc = new SmoothStreamChunk(this, fragmentIndex, duration, bitrate);
            AddChunk(ssc);
        }

        public IEnumerable<int> Bitrates { get { return _bitrates; } }
        public void AddBitrate(int bitrate) { _bitrates.Add(bitrate); }
    }
}
